import { ref, reactive } from 'vue'

// 创建响应式数据存储
export const microAppData = reactive({
  globalData: {},
  updateData(data: Record<string, any>) {
    Object.assign(this.globalData, data)
  }
})

// 修改 dataListener
function dataListener(data: Record<string, any>) {
  console.log('[Vue子应用] 收到主应用数据:', data)
  microAppData.updateData(data)
} 